package com.ruoyi.quanzi.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;

/**
 * 评论对象 sun_comment
 * 
 * @author ruoyi
 */
@Data
public class SunComment extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 评论ID */
    private Long id;

    /** 父评论ID */
    @Excel(name = "父评论ID")
    private Long parentId;

    /** 评论类型 */
    @Excel(name = "评论类型")
    private Integer type;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long uid;

    /** 被回复用户ID */
    @Excel(name = "被回复用户ID")
    private Long toUid;

    /** 帖子ID */
    @Excel(name = "帖子ID")
    private Long postId;

    /** 评论内容 */
    @Excel(name = "评论内容")
    private String content;

    /** 状态（0正常 1删除） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=删除")
    private String status;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 用户昵称 */
    private String nickName;
    
    /** 用户头像 */
    private String avatar;
    
    /** 点赞数 */
    private Integer likeCount;
    
    /** 当前用户是否点赞 */
    private Boolean isLiked;
    
    /** 回复数量 */
    private Integer replyCount;


    @Override
    public String toString() {
        return "SunComment{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", type=" + type +
                ", uid=" + uid +
                ", toUid=" + toUid +
                ", postId=" + postId +
                ", content='" + content + '\'' +
                ", status='" + status + '\'' +
                ", createTime=" + createTime +
                ", nickName='" + nickName + '\'' +
                ", avatar='" + avatar + '\'' +
                ", likeCount=" + likeCount +
                ", isLiked=" + isLiked +
                ", replyCount=" + replyCount +
                '}';
    }
}